$(function() {
    $('#student').datagrid({
        url: '../../score_queryByUser.action',
        singleSelect: true,
        columns: [
                  [{
                      field: 'id',
                      title: 'id',
                      width: 100,
                      checkbox:true
                  }, {
                      field: 'userId',
                      title: 'userId',
                      width: 100,
                      hidden:true
                  }, {
                      field: 'courseId',
                      title: 'courseId',
                      width: 100,
                      hidden:true
                  }, {
                      field: 'niceName',
                      title: '学生',
                      width: 100,
                      align: 'center'
                  }, {
                      field: 'courseName',
                      title: '课程',
                      width: 100,
                      align: 'center'
                  }, {
                      field: 'scores',
                      title: '分数',
                      width: 100,
                      align: 'center'
                  }]
              ],
        fitColumns: true,
        pagination: true,
        pageSize: 1,
        pageList:[1,20,30,40,50],
        fitColumns: true,
        striped: true,
        rownumbers: true
    });

})